package contreller

import (
	"SkillTextJD2/Util"
	"SkillTextJD2/model"
	"fmt"
	"github.com/gin-gonic/gin"
)

func City_arttractions(c *gin.Context) {
	Name := c.Query("Name")
	fmt.Println("Name=", Name)
	var Attractions = model.Attractions{
		//ID:                        c.("txt_cID"),
		Attractions_Name:          c.PostForm("txt_cName"),
		Attractions_discounts:     c.PostForm("txt_cDiscounts"),
		Attraction_transportation: c.PostForm("txt_cTransportation"),
		Tour_period:               c.PostForm("txt_cPeriod"),
		Attractions_price:         c.PostForm("txt_cAttractions_price"),
		//Button:                    c.PostForm("txt_cButton"),
		Attractions_Images: c.PostForm("txt_cImages"),
	}
	Util.DB().Table("attractions").Where("attractions_name = ?", "%"+Attractions.Attractions_Name+"%").Update(Attractions)
	//util.ConnDB().Table("companys").Where("company_id=?", id).Update(company)
	HandlerIndex(c)
}
